export const levelConfig = {
  // 基础配置
  maxLevel: 100, // 最高等级
  expMultiplier: 1.2, // 经验倍率
  maxDailyExp: 10000, // 每日最大经验值

  // 等级配置
  levels: [
    {
      level: 1,
      name: '萌新',
      exp: 0,
      icon: '/levels/1.png',
      color: '#808080',
      rewards: [
        {
          type: 'badge',
          badge: { name: '初来乍到', icon: '/badges/newbie.png' },
        },
      ],
    },
    {
      level: 2,
      name: '新手',
      exp: 100,
      icon: '/levels/2.png',
      color: '#90EE90',
      rewards: [
        {
          type: 'coins',
          amount: 100,
        },
      ],
    },
    {
      level: 5,
      name: '进阶者',
      exp: 1000,
      icon: '/levels/5.png',
      color: '#4169E1',
      rewards: [
        {
          type: 'title',
          title: { name: '初级玩家', icon: '/titles/junior.png' },
        },
        {
          type: 'coins',
          amount: 500,
        },
      ],
    },
    {
      level: 10,
      name: '老手',
      exp: 5000,
      icon: '/levels/10.png',
      color: '#FFD700',
      rewards: [
        {
          type: 'privilege',
          privilege: 'custom_color',
        },
        {
          type: 'coins',
          amount: 1000,
        },
      ],
    },
    {
      level: 20,
      name: '达人',
      exp: 20000,
      icon: '/levels/20.png',
      color: '#FF69B4',
      rewards: [
        {
          type: 'badge',
          badge: { name: '资深玩家', icon: '/badges/expert.png' },
        },
        {
          type: 'coins',
          amount: 2000,
        },
      ],
    },
    {
      level: 50,
      name: '大神',
      exp: 100000,
      icon: '/levels/50.png',
      color: '#FF4500',
      rewards: [
        {
          type: 'title',
          title: { name: '殿堂级', icon: '/titles/master.png' },
        },
        {
          type: 'privilege',
          privilege: 'custom_enter_effect',
        },
      ],
    },
  ],

  // 经验值来源
  expSources: {
    chat: {
      exp: 2,
      cooldown: 60, // 冷却时间(秒)
      dailyLimit: 200, // 每日上限
    },
    gift: {
      exp: 10, // 每消费1元获得的经验
      multiplier: 1.5, // 特殊礼物经验倍率
      dailyLimit: 5000,
    },
    watch: {
      exp: 5, // 每观看1分钟获得的经验
      interval: 60, // 计算间隔(秒)
      dailyLimit: 1000,
    },
    stream: {
      exp: 10, // 每直播1分钟获得的经验
      interval: 60,
      dailyLimit: 2000,
    },
  },

  // 特权配置
  privileges: {
    custom_color: {
      name: '自定义颜色',
      description: '可以自定义聊天文字颜色',
      minLevel: 10,
    },
    custom_badge: {
      name: '自定义徽章',
      description: '可以自定义佩戴的徽章',
      minLevel: 20,
    },
    custom_enter_effect: {
      name: '自定义入场特效',
      description: '可以自定义进入房间的特效',
      minLevel: 50,
    },
  },

  // 成就系统
  achievements: [
    {
      id: 'chat_master',
      name: '聊天达人',
      description: '累计发送1000条消息',
      requirement: 1000,
      reward: {
        type: 'badge',
        badge: { name: '健谈', icon: '/badges/chatty.png' },
      },
    },
    {
      id: 'generous',
      name: '慷慨解囊',
      description: '累计送出价值10000虚拟币的礼物',
      requirement: 10000,
      reward: {
        type: 'title',
        title: { name: '大方', icon: '/titles/generous.png' },
      },
    },
  ],

  // 历史记录
  history: {
    maxLength: 100, // 保留最近100条
    expireTime: 2592000, // 保存时间(30天)
  },

  // 排行榜配置
  ranking: {
    updateInterval: 300, // 更新间隔(秒)
    displayCount: 50, // 显示数量
    rewards: {
      daily: [
        { rank: 1, coins: 1000, exp: 1000 },
        { rank: 2, coins: 500, exp: 500 },
        { rank: 3, coins: 300, exp: 300 },
      ],
      weekly: [
        { rank: 1, coins: 5000, exp: 5000 },
        { rank: 2, coins: 3000, exp: 3000 },
        { rank: 3, coins: 1000, exp: 1000 },
      ],
    },
  },
}
